﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JHECIS.InterfaceTool.Common
{
    public static class ExHelper
    {

        public static string ToSafeString(this string s)
        {
            if (s != null)
            {
                return s.ToString();
            }
            return "";
        }
        public static bool SafeContains(this string val, string value)
        {
            if (val == null)
            {
                return false;
            }
            return val.Contains(value);
        }
        public static bool IsNotNullOrEmpty(this string str)
        {
            return !str.IsNullOrEmpty();
        }
        public static bool IsNullOrEmpty(this string str)
        {
            return string.IsNullOrEmpty(str);
        }
    }
}
